<template>
  <router-view/>
</template>
<script>
export default {
  data() {
    return {
      name: "App"
    }
  }
  , created() {
    let path = 'pc';
    if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
      path = '/m';
    }
    let currentRoute = this.$router.currentRoute.value;
    if (currentRoute.path === path) {
      return;
    }
    this.$router.push({path: path})
  }
}
</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
